<template>
  <NuxtLayout>
    <template #one>
      <div>这里是内容 111111111：</div>
    </template>
    <template #two>
      <div>这里是内容 222222222：</div>
    </template>
    <template #three>
      <p>
        动态改变Layout：<button @click="toggleLayout">layout切换</button>
      </p>
      <div>
        <NuxtLink to="/">返回</NuxtLink>
      </div>
    </template>
  </NuxtLayout>
</template>

<script setup>

const route = useRoute()
const toggleLayout=()=>{
  const layoutName = route.meta.layout
  route.meta.layout = layoutName=='custom' ? 'default':'custom'
}
</script>

<style scoped>

</style>